package unit2_1010.test6;

public class Dog extends Pet {
	
	private int love;

	public int getLove() {
		return love;
	}

	public void setLove(int love) {
		if (love < 1 || love > 10) {
			System.out.println("有效亲密度在1-10之间，默认为5");
			love = 5;
		}
		this.love = love;
	}
	
	@Override
	public  void show() {
		System.out.println("宠物狗自白：\n" + "昵称：" + getName() +
				",性别：" + getSex() + ",健康值：" + getHealth() + ",与主人的亲密度：" + love);

	}
	
	
	
}
